'use strict'

const { parentPort } = require('node:worker_threads')

parentPort.on('message', (msg) => {

    console.log('get message', msg)

    parentPort.postMessage({
        pid: process.pid,
        rand: Math.random()
    })

})
/*
parentPort.postMessage({
    pid: process.pid,
    rand: Math.random()
})
*/
